export class Song {
    constructor(index,song,url='',id) {
        this.index = index;
        this.name = song.name;
        this.artist = getArtist();
        this.src = url;
        this.pic = song.pic||song.picUrl;
        this.id = id;
        this.song = song.song;
        function getArtist() {
            let artists = [];
            song.song.album.artists.map((artist, index) => {
              artists.push(artist.name);
            });
            return artists.join("/");
        }
    }
}